import request from '@/utils/request'
import qs from 'qs';

// 查询【请填写功能名称】列表
export function listSetting(params) {
  return request({
    url: '/message/m/emailsetting/queryPageList',
    method: 'get',
    params
  })
}
// 查询【请填写功能名称】详细
export function getSetting(params) {
  return request({
    url: '/message/m/emailsetting/queryList',
    method: 'get',
    params
  })
}

// 新增【请填写功能名称】
export function addSetting(data) {
  return request({
    url: '/message/m/emailsetting/add',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 编辑【请填写功能名称】
export function updateSetting(data) {
  return request({
    url: '/message/m/emailsetting/update',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 启用停用服务器
export function setEmailStatus(data) {
  return request({
    url: '/message/m/emailsetting/setEmailStatus',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 删除
export function delSetting(data) {
  return request({
    url: '/message/m/emailsetting/delete',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 删除
export function testSendEmailMessage(data) {
  return request({
    url: '/message/m/emailsetting/testSendEmailMessage',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 删除
export function queryActiveCount(params) {
  return request({
    url: '/message/m/emailsetting/queryActiveCount',
    method: 'get',
    params
  })
}

